home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / education / pe039.dms / pe039.adf / COLOUR_IT_1.3 / COLOUR_IT_1.amosSourceCode < prev    next >
AMOS Source Code  |  1991-05-01  |  4KB  |  136 lines

  1. Screen Open 1,640,256,2,Hires : Curs Off : Cls 0 : Hide 
  2. I
  3. Procedure I
  4. Print ""
  5. Under On : Centre "COLOUR_IT 1.3 BY ANDY PAUL"
  6. Under Off 
  7. Print "" : Centre "CREATED USING AMOS"
  8. Print "" : Print ""
  9. Print "COLOUR_IT 1.3 is DISKWARE,if you keep this disk intact with source code"
  10. Print "then please send me some disks,there is no set amount,just send what you feel"
  11. Print "it's worth.This program can be freely distributed as long as no profit is"
  12. Print "made to the copier.(No more than ï¿½1.50)"
  13. Print ""
  14. Print ""
  15. Print "Colour_it is quite simply a colouring book.It will flood fill any IFF"
  16. Print "picture lowres."
  17. Print ""
  18. Print "When designing your own pictures using (ie DPaint) it is best to draw"
  19. Print "in 32 colours Low-res.The first colour in your pallette must be colour"
  20. Print "0 in other words Black.Make sure no other colour is black,colour_it will"
  21. Print "not fill anything black,because that is the outline colour."
  22. Print ""
  23. Print "When saving your picture save it in the PICTURES directory on this disk"
  24. Print ""
  25. Print ""
  26. Centre "USING COLOUR-IT"
  27. Print ""
  28. Print ""
  29. Print "                Press Right mouse button for colour selection"
  30. Print ""
  31. Print "                     Press left mouse button to paint"
  32. Print ""
  33. Print "         Press L for Load picture        Press S for Saving picture"
  34. Print "                             Press Q to Quit"
  35. Print ""
  36. Print "                            PRESS A KEY........."
  37. Clear Key : Wait Key 
  38. Fade 2 : Wait 20
  39. Screen Open 2,320,256,32,Lowres : Curs Off : Flash Off : Hide : Cls 0
  40. Unpack 6 To 2
  41. On Error Proc HELP
  42. A
  43. End Proc
  44. Procedure A
  45. Show 
  46. 'Unpack 6 To 2 
  47. Hide 
  48. Limit Mouse 0,0 To 450,274
  49. Clear Key 
  50. Wait Key 
  51. Rem now move screen 2 out off the way
  52. Channel 1 To Screen Display 2
  53. Amal 1,"M 0,235,50" : Amal On 
  54. Sam Play 1,1,8500
  55. Wait 50
  56. Show On 
  57. Pen 1 : Paper 24
  58. Screen Close 1
  59. Screen Open 1,320,256,32,Lowres : Curs Off : Cls 0
  60. Rem load an iff picture
  61. L_OADAGAIN:
  62. F$=Fsel$(":pictures/","","Load a picture")
  63. If F$="" Then Goto 10
  64. If Exist(F$) Then Load Iff F$,1
  65. Sam Play 1,1,10000
  66. 10
  67. Screen To Front 2
  68. Screen 1
  69. Repeat 
  70.   If Mouse Key=1 Then CHECK_P
  71.   If Mouse Key=2 Then R_G_B
  72.   If Key State(40) Then Gosub L_OADAGAIN
  73.   If Key State(33) Then C_OLITSAVE
  74.   If Key State(16) Then Cls 0 : Screen 2 : Cls 0 : Screen 1 : Locate ,15 : Pen 1 : Paper 0 : Centre "THANK YOU,THAT WAS FUN" : Wait 150 : End 
  75. Until FIN=True
  76. End Proc
  77. Procedure CHECK_P
  78. Rem check to see if point x mouse,y mouse is colour 0 or black 
  79. A=X Mouse-128 : B=Y Mouse-42
  80. If Point(A,B)=0 : Sam Play 2,2,8000
  81.  Else 
  82.  Screen 1 : Paint A,B,0 : Wait 10
  83. End If 
  84. End Proc
  85. Procedure R_G_B
  86. Rem lets get the colour you want and also put it on screen 2 
  87. RGBWINDOW[120,20,12]
  88. _COL=Param
  89. Rem cant have them choosing black can we ? 
  90. If _COL=0 Then _COL=1
  91. Ink _COL
  92. End Proc
  93. Procedure RGBWINDOW[X,Y,SIZE]
  94.    Rem a nice little proc by Gary Fearn (what a nice man) 
  95.    NCOLS=Screen Colour
  96.    Get Cblock 1,X-10,Y-10,X+(SIZE*2)+10,Y+(SIZE*NCOLS/2)+10
  97.    Bar X-8,Y-8 To X+(SIZE*2)+8,Y+(SIZE*NCOLS/2)+8
  98.    Reserve Zone NCOLS+1
  99.    For B=0 To NCOLS/2 Step NCOLS/2
  100.       For A=0 To(NCOLS/2)-1
  101.          Ink A+B : Bar X,Y To X+SIZE,Y+SIZE
  102.          Set Zone A+B+1,X,Y To X+SIZE,Y+SIZE
  103.          Add Y,SIZE
  104.       Next A
  105.       Add X,SIZE
  106.       Add Y,-(SIZE*(NCOLS/2))
  107.    Next B
  108. AGAIN:
  109.    While M=0
  110.       X=Mouse Zone
  111.       M=Mouse Key
  112.    Wend 
  113.    If X=0 Then M=0 : Goto AGAIN
  114.    Put Cblock 1
  115.    Reset Zone 
  116.    RGB=X-1 : Rem RGB = selected colour  
  117.    Wait 10
  118. End Proc[RGB]
  119. Procedure C_OLITSAVE
  120. Rem save an iff picture
  121. Clear Key 
  122. F$=Fsel$(":ALBUM/","","Save Pic as......")
  123. If F$="" Then Pop Proc
  124. Save Iff F$,1
  125. End Proc
  126. Procedure HELP
  127. Screen Open 3,320,40,4,Lowres : Cls 0 : Paper 0 : Pen 3
  128. Bell 
  129. Print ""
  130. Centre "AN ERROR HAS BEEN DETECTED"
  131. Print ""
  132. Centre "PLEASE TRY AGAIN....WAIT"
  133. Wait 150
  134. Screen Close 3
  135. Resume Next 
  136. End Proc